﻿using Furion.CMS.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Furion.CMS.Domain
{
    [OperateRecord("资源库存储配置")]
    public class ObjectStorageParams : ValueObject
    {
        /// <summary>
        /// 接入地址
        /// </summary>
        [MaxLength(200)]
        [DisplayName("接入地址")]
        [OperateRecord("接入地址")]
        public string Url { get; set; }
        /// <summary>
        /// 接入key
        /// </summary>
        [MaxLength(100)]
        [DisplayName("接入key")]
        [OperateRecord("接入key")]
        public string KeyId { get; set; }
        /// <summary>
        /// 接入secret
        /// </summary>
        [MaxLength(100)]
        [DisplayName("接入secret")]
        [OperateRecord("接入secret")]
        public string KeySecret { get; set; }

        protected override IEnumerable<object> GetEqualityComponents()
        {
            yield return Url;
            yield return KeyId;
            yield return KeySecret;
        }
    }
}
